﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XStudio.XCRF.Data.Entities.CureInfo;

namespace XStudio.XCRF.Data.Business
{
    public static class DiseaseHerbBusiness
    {
        /// <summary>
        /// 获取单症对应的用药集合
        /// </summary>
        /// <param name="diseases">单症集合</param>
        /// <returns></returns>
        public static IEnumerable<Herb> GetHerbs(this IEnumerable<Disease> diseases)
        {
            return diseases.SelectMany(d => d.Herbs).Distinct();
        }
    }
}
